package leetcode.medium.limit100;

/**
 * @author yaoyao1.liu@zhaopin.com.cn
 * @since 2022-11-09 18:19
 **/
public class No55 {
    public boolean canJump(int[] nums) {
        int k = 0;
        for (int i = 0; i < nums.length; i++) {
            if (i > k) {
                return false;
            }
            k = Math.max(k, i + nums[i]);
        }
        return true;
    }
}
